package com.firexxx.study.designmodel.visitor;

/**
 * @description: TODO
 * @author: zhuangzhang2
 * @date: 2020-12-24 14:34
 */
public class Main {

    public static void main(String[] args) {
        DefaultVisitor defaultVisitor = new DefaultVisitor();

        Tree tree = new Tree();
        tree.add(new RootElement());
        tree.add(new LeftElement());
        tree.add(new LeftElement());
        tree.add(new LeftElement());
        tree.add(new LeftElement());

        tree.visit(defaultVisitor);
    }

}
